Move gdk_window_clear() into common code, implement in terms of
authorOwen Taylor <otaylor@redhat.com>
Fri, 5 May 2000 15:57:48 +0000 (15:57 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 5 May 2000 15:57:48 +0000 (15:57 +0000)
Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>

* gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
gdk_window_clear() into common code, implement in terms of
gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
not redirected to the backing rectangle.

Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>

* gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
EXTRA_DIST. It does not work well when the file that
everything depends on is not in the tarball.

Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>

* gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
with recursion where process_updates() is called from
an expose handler. (GtkTextView is highly broken in
doing this, but it should work, so it is a nice test
case.)

Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>

* gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
handle the case where updates are queued during processing of
updates.

Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>

* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
window is on gdk_display - use that instead of segfaulting.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdkwindow.c
gdk/x11/gdkwindow-x11.c
gtk/Makefile.am

index f244a1724b0d8680ecd95329687527f09d9d0711..d7f288f319bb0f6461543b7878f076bd1eb6964a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+       gdk_window_clear() into common code, implement in terms of
+       gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+       not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into 
+       EXTRA_DIST. It does not work well when the file that
+       everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+       with recursion where process_updates() is called from
+       an expose handler. (GtkTextView is highly broken in
+       doing this, but it should work, so it is a nice test
+       case.)
+
+Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+       handle the case where updates are queued during processing of
+       updates.
+
+Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+       window is on gdk_display - use that instead of segfaulting.
+
 Thu May  4 02:04:46 2000  Tim Janik  <timj@gtk.org>
 
         * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
index f244a1724b0d8680ecd95329687527f09d9d0711..d7f288f319bb0f6461543b7878f076bd1eb6964a 100644 (file)
@@ -1,3 +1,35 @@
+Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+       gdk_window_clear() into common code, implement in terms of
+       gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+       not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into 
+       EXTRA_DIST. It does not work well when the file that
+       everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+       with recursion where process_updates() is called from
+       an expose handler. (GtkTextView is highly broken in
+       doing this, but it should work, so it is a nice test
+       case.)
+
+Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+       handle the case where updates are queued during processing of
+       updates.
+
+Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+       window is on gdk_display - use that instead of segfaulting.
+
 Thu May  4 02:04:46 2000  Tim Janik  <timj@gtk.org>
 
         * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
index f244a1724b0d8680ecd95329687527f09d9d0711..d7f288f319bb0f6461543b7878f076bd1eb6964a 100644 (file)
@@ -1,3 +1,35 @@
+Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+       gdk_window_clear() into common code, implement in terms of
+       gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+       not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into 
+       EXTRA_DIST. It does not work well when the file that
+       everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+       with recursion where process_updates() is called from
+       an expose handler. (GtkTextView is highly broken in
+       doing this, but it should work, so it is a nice test
+       case.)
+
+Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+       handle the case where updates are queued during processing of
+       updates.
+
+Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+       window is on gdk_display - use that instead of segfaulting.
+
 Thu May  4 02:04:46 2000  Tim Janik  <timj@gtk.org>
 
         * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
index f244a1724b0d8680ecd95329687527f09d9d0711..d7f288f319bb0f6461543b7878f076bd1eb6964a 100644 (file)
@@ -1,3 +1,35 @@
+Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+       gdk_window_clear() into common code, implement in terms of
+       gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+       not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into 
+       EXTRA_DIST. It does not work well when the file that
+       everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+       with recursion where process_updates() is called from
+       an expose handler. (GtkTextView is highly broken in
+       doing this, but it should work, so it is a nice test
+       case.)
+
+Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+       handle the case where updates are queued during processing of
+       updates.
+
+Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+       window is on gdk_display - use that instead of segfaulting.
+
 Thu May  4 02:04:46 2000  Tim Janik  <timj@gtk.org>
 
         * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
index f244a1724b0d8680ecd95329687527f09d9d0711..d7f288f319bb0f6461543b7878f076bd1eb6964a 100644 (file)
@@ -1,3 +1,35 @@
+Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+       gdk_window_clear() into common code, implement in terms of
+       gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+       not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into 
+       EXTRA_DIST. It does not work well when the file that
+       everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+       with recursion where process_updates() is called from
+       an expose handler. (GtkTextView is highly broken in
+       doing this, but it should work, so it is a nice test
+       case.)
+
+Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+       handle the case where updates are queued during processing of
+       updates.
+
+Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+       window is on gdk_display - use that instead of segfaulting.
+
 Thu May  4 02:04:46 2000  Tim Janik  <timj@gtk.org>
 
         * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
index f244a1724b0d8680ecd95329687527f09d9d0711..d7f288f319bb0f6461543b7878f076bd1eb6964a 100644 (file)
@@ -1,3 +1,35 @@
+Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+       gdk_window_clear() into common code, implement in terms of
+       gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+       not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into 
+       EXTRA_DIST. It does not work well when the file that
+       everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+       with recursion where process_updates() is called from
+       an expose handler. (GtkTextView is highly broken in
+       doing this, but it should work, so it is a nice test
+       case.)
+
+Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+       handle the case where updates are queued during processing of
+       updates.
+
+Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+       window is on gdk_display - use that instead of segfaulting.
+
 Thu May  4 02:04:46 2000  Tim Janik  <timj@gtk.org>
 
         * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
index f244a1724b0d8680ecd95329687527f09d9d0711..d7f288f319bb0f6461543b7878f076bd1eb6964a 100644 (file)
@@ -1,3 +1,35 @@
+Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+       gdk_window_clear() into common code, implement in terms of
+       gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+       not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into 
+       EXTRA_DIST. It does not work well when the file that
+       everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+       with recursion where process_updates() is called from
+       an expose handler. (GtkTextView is highly broken in
+       doing this, but it should work, so it is a nice test
+       case.)
+
+Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+       handle the case where updates are queued during processing of
+       updates.
+
+Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+       window is on gdk_display - use that instead of segfaulting.
+
 Thu May  4 02:04:46 2000  Tim Janik  <timj@gtk.org>
 
         * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
index 3164b8ecfc19fb3b9696a5c7bc50aa787177950b..a0506366597154938fd6dc01136b3a6e3976ce49 100644 (file)
@@ -945,6 +945,18 @@ gdk_window_clear_backing_rect (GdkWindow *window,
   gdk_gc_unref (tmp_gc);
 }
 
+void
+gdk_window_clear (GdkWindow *window)
+{
+  GdkWindowPrivate *private = (GdkWindowPrivate *)window;
+
+  g_return_if_fail (window != NULL);
+  g_return_if_fail (GDK_IS_WINDOW (window));
+
+  gdk_window_clear_area (window, 0, 0,
+                        private->drawable.width, private->drawable.height);
+}
+
 void
 gdk_window_clear_area (GdkWindow *window,
                       gint       x,
@@ -1026,33 +1038,42 @@ gdk_window_process_updates_internal (GdkWindow *window)
 {
   GdkWindowPrivate *private = (GdkWindowPrivate *)window;
   gboolean save_region = FALSE;
-  
-  if (gdk_event_func)
-    {
-      GdkEvent event;
-      GdkRectangle window_rect;
 
-      window_rect.x = 0;
-      window_rect.y = 0;
-      window_rect.width = private->drawable.width;
-      window_rect.height = private->drawable.height;
+  /* If an update got queued during update processing, we can get a
+   * window in the update queue that has an empty update_area.
+   * just ignore it.
+   */
+  if (private->update_area)
+    {
+      GdkRegion *update_area = private->update_area;
+      private->update_area = NULL;
+      
+      if (gdk_event_func)
+       {
+         GdkEvent event;
+         GdkRectangle window_rect;
+         
+         window_rect.x = 0;
+         window_rect.y = 0;
+         window_rect.width = private->drawable.width;
+         window_rect.height = private->drawable.height;
 
-      save_region = _gdk_windowing_window_queue_antiexpose (window, private->update_area);
+         save_region = _gdk_windowing_window_queue_antiexpose (window, update_area);
       
-      event.expose.type = GDK_EXPOSE;
-      event.expose.window = gdk_window_ref ((GdkWindow *)private);
-      event.expose.count = 0;
+         event.expose.type = GDK_EXPOSE;
+         event.expose.window = gdk_window_ref ((GdkWindow *)private);
+         event.expose.count = 0;
       
-      gdk_region_get_clipbox (private->update_area, &event.expose.area);
-      if (gdk_rectangle_intersect (&event.expose.area, &window_rect, &event.expose.area))
-       {
-         (*gdk_event_func) (&event, gdk_event_data);
+         gdk_region_get_clipbox (update_area, &event.expose.area);
+         if (gdk_rectangle_intersect (&event.expose.area, &window_rect, &event.expose.area))
+           {
+             (*gdk_event_func) (&event, gdk_event_data);
+           }
        }
+      
+      if (!save_region)
+       gdk_region_destroy (update_area);
     }
-  
-  if (!save_region)
-    gdk_region_destroy (private->update_area);
-  private->update_area = NULL;
 }
 
 void
index 0dfd24cd17f8034b1dec3d220c5af17e78e64b8f..9011ac6e133ccf88cdc754f91ee0d76b25ce11f5 100644 (file)
@@ -463,7 +463,7 @@ gdk_window_foreign_new (guint32 anid)
     parent_private->children = g_list_prepend (parent_private->children, window);
   
   GDK_DRAWABLE_XDATA (window)->xid = anid;
-  GDK_DRAWABLE_XDATA (window)->xdisplay = GDK_DRAWABLE_XDISPLAY (private->parent);
+  GDK_DRAWABLE_XDATA (window)->xdisplay = gdk_display;
 
   private->x = attrs.x;
   private->y = attrs.y;
@@ -805,16 +805,6 @@ gdk_window_reparent (GdkWindow *window,
   parent_private->children = g_list_prepend (parent_private->children, window);
 }
 
-void
-gdk_window_clear (GdkWindow *window)
-{
-  g_return_if_fail (window != NULL);
-  g_return_if_fail (GDK_IS_WINDOW (window));
-  
-  if (!GDK_DRAWABLE_DESTROYED (window))
-    XClearWindow (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window));
-}
-
 void
 _gdk_windowing_window_clear_area (GdkWindow *window,
                                  gint       x,
@@ -1348,12 +1338,15 @@ gdk_window_get_pointer (GdkWindow       *window,
   int winx = 0;
   int winy = 0;
   unsigned int xmask = 0;
+  gint xoffset, yoffset;
 
   g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
   
   if (!window)
     window = gdk_parent_root;
   
+  _gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
+
   return_val = NULL;
   if (!GDK_DRAWABLE_DESTROYED (window) &&
       XQueryPointer (GDK_DRAWABLE_XDISPLAY (window),
@@ -1365,9 +1358,9 @@ gdk_window_get_pointer (GdkWindow       *window,
     }
   
   if (x)
-    *x = winx;
+    *x = winx + xoffset;
   if (y)
-    *y = winy;
+    *y = winy + yoffset;
   if (mask)
     *mask = xmask;
   
index 50b77f76c3c5bc0ef09feb3393c3479f0934b8d5..296dda3e7f110bd455159608cc9d6943a832b7b9 100644 (file)
@@ -481,6 +481,7 @@ test-debug: testgtk
        $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtk
 
 EXTRA_DIST += @STRIP_BEGIN@    \
+       OLD_STAMP               \
        testgtk.1               \
        testgtkrc               \
        testgtkrc2              \